package cn.agiledata.bank.transaction.dao;

import java.util.List;

import cn.agiledata.bank.hibernateBean.ActionType;
import com.vnv.infrastructure.logic.IPBHibernate3BaseMgr;

public class ActionTypeDaoImpl extends IPBHibernate3BaseMgr implements ActionTypeDao {
    public ActionType getActionType(long id) {
        return (ActionType) getHibernateTemplate().get(ActionType.class,
                new Long(id));
    }

    public ActionType getActionTypeByCode(String actionTypeCode) {
        String hql = "from ActionType at where at.actionId=?";
        List resultList = getHibernateTemplate().find(hql, actionTypeCode);
        return resultList.size() == 0 ? null : (ActionType) resultList.get(0);
    }
}
